<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //is比较，相当于===

        let obj1 = {
            name:"张三"
        }
        let obj2 = {
            
            name:"李四"
        }
        let obj3 = {
            age:10,

        }
        
        // let flag =   Object.is(obj1,obj2)
        // let flag =   Object.is(NaN,NaN)
        // console.log(flag);
        // console.log(NaN===NaN);//特殊

        		//assign()方法，主要是浅拷贝，用于对象的合并
//		把两个对象的合并到target对象中
//		Object.assign(target,obj1,obj2)

        let newObj = {};

        Object.assign(newObj,obj2,obj3);
        // newObj.name = "狗蛋";
        console.log(obj2)
        console.log(newObj)
    </script>
</body>
</html>